<div id="toppanel">
	<div id="panel">
		<div class="content clearfix">
				<!-- Login Form -->
				<form action="_lib/login.php" method="post">
					<label for="log">Usuario:</label>
					<input class="field"  name="username" type="text" id="username" value=""  />
					<label for="pwd">Contraseña:</label>
					<input class="field" name="password" type="password" id="password"  />
					<input type="submit" name="submit" value=" " class="bt_login" />
					<div class="clear"></div>				
				</form>
				<label class="error" >
					<?php 
					if (isset($_SESSION['logueado'])){
						$_SESSION['logueado']->printError() ;
					}
					?>
					</label>
		</div>
	</div>

		<div class="tab">
		<div class="tabclear">
			<ul class="login">
				<li class="left">&nbsp;</li>
				<li>	
					<?php 
					if (isset($_SESSION['logueado'])){
						$_SESSION['logueado']->printUserData();
					}
					?>
				</li>
				<li class="sep">|</li>
				<li id="toggle">
				<?php 
					if (isset($_SESSION['logueado'])){
						if($_SESSION['logueado']->isLoggedIn())
							echo"<a id='logueado' class='logueado' href='_lib/logout.php'>Salir</a>";
							else{
								echo"<a id='open' class='open' href='#'>Acceso Admin</a>";
								echo"<a id='close' style='display: none;' class='close' href='#'>Cerrar Panel</a>";
								}
					}
					else{
						echo"<a id='open' class='open' href='#'>Acceso Admin</a>";
						echo"<a id='close' style='display: none;' class='close' href='#'>Cerrar Panel</a>";
					}
					?>				
				</li>
				<li class="right">&nbsp;</li>
			</ul> 
		</div> 
	</div> 
</div> 

